﻿export default () => {
  const ORDER_STATUS_DIC = [
    { label: "待支付", value: "01" },
    { label: "待派单", value: "02" },
    { label: "待审核", value: "03" },
    { label: "已拒单", value: "04" },
    { label: "待发货", value: "05" },
    { label: "待收货", value: "06" },
    { label: "租用中", value: "07" },
    { label: "待结算", value: "08" },
    { label: "已完成", value: "09" },
    { label: "已关闭", value: "10" },
  ];

  const CHANNEL_SOURCE_DIC = [
    { label: "小程序", value: "01" },
    { label: "公众号", value: "02" },
    { label: "支付宝", value: "03" },
    { label: "微信", value: "04" },
    { label: "抖音", value: "05" },
  ];

  const IS_CLAIMED_DIC = [
    { label: "是", value: "1" },
    { label: "否", value: "0" },
  ];

  const ORDER_SOURCE_DIC = [
    { label: "小程序", value: "01" },
    { label: "公众号", value: "02" },
    { label: "支付宝", value: "03" },
    { label: "微信", value: "04" },
    { label: "抖音", value: "05" },
  ];

  const IS_NOTARIZATION_DIC = [
    { label: "是", value: "1" },
    { label: "否", value: "0" },
  ];

  const CHANNEL_GROUP_DIC = [
    { label: "渠道分组1", value: "01" },
    { label: "渠道分组2", value: "02" },
    { label: "渠道分组3", value: "03" },
  ];

  const PROMOTION_CHANNEL_DIC = [
    { label: "推广渠道1", value: "01" },
    { label: "推广渠道2", value: "02" },
    { label: "推广渠道3", value: "03" },
  ];

  const ZHIMA_CHANNEL_DIC = [
    { label: "芝麻渠道1", value: "01" },
    { label: "芝麻渠道2", value: "02" },
    { label: "芝麻渠道3", value: "03" },
  ];

  const IS_PROXY_DELIVERY_DIC = [
    { label: "是", value: "1" },
    { label: "否", value: "0" },
  ];

  const ORDER_PLATFORM_DIC = [
    { label: "下单平台1", value: "01" },
    { label: "下单平台2", value: "02" },
    { label: "下单平台3", value: "03" },
  ];

  const DISPATCH_MODE_DIC = [
    { label: "派单模式1", value: "01" },
    { label: "派单模式2", value: "02" },
    { label: "派单模式3", value: "03" },
  ];

  const ADDITIONAL_SERVICE_DIC = [
    { label: "增值服务1", value: "01" },
    { label: "增值服务2", value: "02" },
    { label: "增值服务3", value: "03" },
  ];

  const RETURN_ALIPAY_DIC = [
    { label: "回传支付宝1", value: "01" },
    { label: "回传支付宝2", value: "02" },
    { label: "回传支付宝3", value: "03" },
  ];

  const searchOption = ref({
    labelPosition: "top",
    labelWidth: "auto",
    menuPosition: "fixed",
    col: {
      xs: 24,
      sm: 8,
      md: 8,
      lg: 6,
      xl: 4,
      span: 4,
    },
    formConfig: {
      orderNo: {
        label: "订单编号",
        clearable: true,
        component: "el-input",
      },
      goodsName: {
        label: "商品名称",
        clearable: true,
        component: "el-input",
      },
      receiverName: {
        label: "收货人姓名",
        clearable: true,
        component: "el-input",
      },
      receiverPhone: {
        label: "收货人手机号",
        clearable: true,
        component: "el-input",
      },
      receiverIdCard: {
        label: "证件号",
        clearable: true,
        component: "el-input",
      },
      // 订单状态
      orderStatus: {
        label: "订单状态",
        component: "el-select",
        dicData: ORDER_STATUS_DIC,
        dicProps: { label: "label", value: "value" },
        clearable: true,
        placeholder: "请选择订单状态",
      },
      // 渠道来源
      channelSource: {
        label: "渠道来源",
        component: "el-select",
        dicData: CHANNEL_SOURCE_DIC,
        dicProps: { label: "label", value: "value" },
        clearable: true,
        placeholder: "请选择渠道来源",
      },
      // 注册手机号
      registerPhone: {
        label: "注册手机号",
        component: "el-input",
        clearable: true,
      },
      // SN编码
      snNo: {
        label: "SN编码",
        component: "el-input",
        clearable: true,
      },
      // 下单时间
      createTime: {
        label: "下单时间",
        component: "el-date-picker",
        type: "daterange",
        format: "YYYY-MM-DD",
        valueFormat: "YYYY-MM-DD",
        clearable: true,
      },
      // 是否认领
      isClaimed: {
        label: "是否认领",
        component: "el-select",
        clearable: true,
        dicData: IS_CLAIMED_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择是否认领",
      },
      // 近期还款
      recentRepayment: {
        label: "近期还款",
        component: "el-date-picker",
        type: "daterange",
        format: "YYYY-MM-DD",
        valueFormat: "YYYY-MM-DD",
        clearable: true,
      },
      // 租赁标签
      leaseTag: {
        label: "租赁标签",
        component: "el-input",
        clearable: true,
        isCollapse: true,
      },
      // 订单来源
      orderSource: {
        label: "订单来源",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: ORDER_SOURCE_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择订单来源",
      },
      // 是否发起公证
      isNotarization: {
        label: "是否发起公证",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: IS_NOTARIZATION_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择是否发起公证",
      },
      // 渠道分组
      channelGroup: {
        label: "渠道分组",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: CHANNEL_GROUP_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择渠道分组",
      },
      // 推广渠道
      promotionChannel: {
        label: "推广渠道",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: PROMOTION_CHANNEL_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择推广渠道",
      },
      // 芝麻渠道
      zhimaChannel: {
        label: "芝麻渠道",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: ZHIMA_CHANNEL_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择芝麻渠道",
      },
      // 认领人
      claimer: {
        label: "认领人",
        component: "el-input",
        clearable: true,
        isCollapse: true,
      },
      // 是否代发
      isProxyDelivery: {
        label: "是否代发",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: IS_PROXY_DELIVERY_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择是否代发",
      },
      // 下单平台
      orderPlatform: {
        label: "下单平台",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: ORDER_PLATFORM_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择下单平台",
      },
      // 店铺名称
      shopName: {
        label: "店铺名称",
        component: "el-input",
        clearable: true,
        isCollapse: true,
      },
      // 派单模式
      dispatchMode: {
        label: "派单模式",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: DISPATCH_MODE_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择派单模式",
      },
      // 增值服务
      additionalService: {
        label: "增值服务",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: ADDITIONAL_SERVICE_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择增值服务",
      },
      // 回传支付宝
      returnAlipay: {
        label: "回传支付宝",
        component: "el-select",
        clearable: true,
        isCollapse: true,
        dicData: RETURN_ALIPAY_DIC,
        dicProps: { label: "label", value: "value" },
        placeholder: "请选择回传支付宝",
      },
    },
  });

  return {
    searchOption,
  };
};
